<--- %%NOBANNER%% --> data.sas
 BackForward

/*-------------------------------------------------------------------------------\
| SOURCE:   data.sas                                                             |
|                                                                                |
| VERSION:  RDS v3.0                                                             |
|                                                                                |
| PURPOSE:  This macro is used to make notes in the sas log more clear.  It      |
|           takes an input string (a dataset name) and checks the format.  If it |
|           is a first level dataset name (i.e. TEMP) the macro turns the value  |
|           into a second level dataset name (i.e. WORK.TEMP.)  If the input     |
|           string is already a two level it does not add the WORK. string in    |
|           front of the value.  In either case, it returns the value as         |
|           uppercase text.                                                      |
|                                                                                |
| SYNTAX:   %data (_dataset_name_)                                     |
\-------------------------------------------------------------------------------*/
%macro data (indata) /des='standardize dataset name';
%local indata;
%if %index(&indata,.) = 0 %then %let indata=%upcase(work.&indata.);
%else %let indata=%upcase(&indata); &indata
%mend data ;